Optimal. Leaf size=130 \[ -\frac{b^3}{4 a^3 f (a+b) \left (a \cos ^2(e+f x)+b\right )^2}+\frac{b^2 (3 a+2 b)}{2 a^3 f (a+b)^2 \left (a \cos ^2(e+f x)+b\right )}+\frac{b \left (3 a^2+3 a b+b^2\right ) \log \left (a \cos ^2(e+f x)+b\right )}{2 a^3 f (a+b)^3}+\frac{\log (\sin (e+f x))}{f (a+b)^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.165065, antiderivative size = 130, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {4138, 446, 88} \[ -\frac{b^3}{4 a^3 f (a+b) \left (a \cos ^2(e+f x)+b\right )^2}+\frac{b^2 (3 a+2 b)}{2 a^3 f (a+b)^2 \left (a \cos ^2(e+f x)+b\right )}+\frac{b \left (3 a^2+3 a b+b^2\right ) \log \left (a \cos ^2(e+f x)+b\right )}{2 a^3 f (a+b)^3}+\frac{\log (\sin (e+f x))}{f (a+b)^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4138
Rule 446
Rule 88
Rubi steps
\begin{align*} \int \frac{\cot (e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{x^7}{\left (1-x^2\right ) \left (b+a x^2\right )^3} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac{\operatorname{Subst}\left (\int \frac{x^3}{(1-x) (b+a x)^3} \, dx,x,\cos ^2(e+f x)\right )}{2 f}\\ &=-\frac{\operatorname{Subst}\left (\int \left (-\frac{1}{(a+b)^3 (-1+x)}-\frac{b^3}{a^2 (a+b) (b+a x)^3}+\frac{b^2 (3 a+2 b)}{a^2 (a+b)^2 (b+a x)^2}-\frac{b \left (3 a^2+3 a b+b^2\right )}{a^2 (a+b)^3 (b+a x)}\right ) \, dx,x,\cos ^2(e+f x)\right )}{2 f}\\ &=-\frac{b^3}{4 a^3 (a+b) f \left (b+a \cos ^2(e+f x)\right )^2}+\frac{b^2 (3 a+2 b)}{2 a^3 (a+b)^2 f \left (b+a \cos ^2(e+f x)\right )}+\frac{b \left (3 a^2+3 a b+b^2\right ) \log \left (b+a \cos ^2(e+f x)\right )}{2 a^3 (a+b)^3 f}+\frac{\log (\sin (e+f x))}{(a+b)^3 f}\\ \end{align*}
Mathematica [A] time = 1.09815, size = 158, normalized size = 1.22 \[ \frac{\sec ^6(e+f x) (a \cos (2 (e+f x))+a+2 b)^3 \left (-\frac{b^3 (a+b)^2}{a^3 \left (-a \sin ^2(e+f x)+a+b\right )^2}+\frac{2 b^2 (a+b) (3 a+2 b)}{a^3 \left (-a \sin ^2(e+f x)+a+b\right )}+\frac{2 b \left (3 a^2+3 a b+b^2\right ) \log \left (-a \sin ^2(e+f x)+a+b\right )}{a^3}+4 \log (\sin (e+f x))\right )}{32 f (a+b)^3 \left (a+b \sec ^2(e+f x)\right )^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.102, size = 304, normalized size = 2.3 \begin{align*}{\frac{3\,b\ln \left ( b+a \left ( \cos \left ( fx+e \right ) \right ) ^{2} \right ) }{2\,f \left ( a+b \right ) ^{3}a}}+{\frac{3\,{b}^{2}\ln \left ( b+a \left ( \cos \left ( fx+e \right ) \right ) ^{2} \right ) }{2\,f \left ( a+b \right ) ^{3}{a}^{2}}}+{\frac{{b}^{3}\ln \left ( b+a \left ( \cos \left ( fx+e \right ) \right ) ^{2} \right ) }{2\,f \left ( a+b \right ) ^{3}{a}^{3}}}+{\frac{3\,{b}^{2}}{2\,f \left ( a+b \right ) ^{3}a \left ( b+a \left ( \cos \left ( fx+e \right ) \right ) ^{2} \right ) }}+{\frac{5\,{b}^{3}}{2\,f \left ( a+b \right ) ^{3}{a}^{2} \left ( b+a \left ( \cos \left ( fx+e \right ) \right ) ^{2} \right ) }}+{\frac{{b}^{4}}{f \left ( a+b \right ) ^{3}{a}^{3} \left ( b+a \left ( \cos \left ( fx+e \right ) \right ) ^{2} \right ) }}-{\frac{{b}^{3}}{4\,f \left ( a+b \right ) ^{3}a \left ( b+a \left ( \cos \left ( fx+e \right ) \right ) ^{2} \right ) ^{2}}}-{\frac{{b}^{4}}{2\,f \left ( a+b \right ) ^{3}{a}^{2} \left ( b+a \left ( \cos \left ( fx+e \right ) \right ) ^{2} \right ) ^{2}}}-{\frac{{b}^{5}}{4\,f \left ( a+b \right ) ^{3}{a}^{3} \left ( b+a \left ( \cos \left ( fx+e \right ) \right ) ^{2} \right ) ^{2}}}+{\frac{\ln \left ( 1+\cos \left ( fx+e \right ) \right ) }{2\,f \left ( a+b \right ) ^{3}}}+{\frac{\ln \left ( -1+\cos \left ( fx+e \right ) \right ) }{2\,f \left ( a+b \right ) ^{3}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.01423, size = 328, normalized size = 2.52 \begin{align*} \frac{\frac{2 \,{\left (3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \log \left (a \sin \left (f x + e\right )^{2} - a - b\right )}{a^{6} + 3 \, a^{5} b + 3 \, a^{4} b^{2} + a^{3} b^{3}} + \frac{6 \, a^{2} b^{2} + 9 \, a b^{3} + 3 \, b^{4} - 2 \,{\left (3 \, a^{2} b^{2} + 2 \, a b^{3}\right )} \sin \left (f x + e\right )^{2}}{a^{7} + 4 \, a^{6} b + 6 \, a^{5} b^{2} + 4 \, a^{4} b^{3} + a^{3} b^{4} +{\left (a^{7} + 2 \, a^{6} b + a^{5} b^{2}\right )} \sin \left (f x + e\right )^{4} - 2 \,{\left (a^{7} + 3 \, a^{6} b + 3 \, a^{5} b^{2} + a^{4} b^{3}\right )} \sin \left (f x + e\right )^{2}} + \frac{2 \, \log \left (\sin \left (f x + e\right )^{2}\right )}{a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}}}{4 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.92186, size = 670, normalized size = 5.15 \begin{align*} \frac{5 \, a^{2} b^{3} + 8 \, a b^{4} + 3 \, b^{5} + 2 \,{\left (3 \, a^{3} b^{2} + 5 \, a^{2} b^{3} + 2 \, a b^{4}\right )} \cos \left (f x + e\right )^{2} + 2 \,{\left (3 \, a^{2} b^{3} + 3 \, a b^{4} + b^{5} +{\left (3 \, a^{4} b + 3 \, a^{3} b^{2} + a^{2} b^{3}\right )} \cos \left (f x + e\right )^{4} + 2 \,{\left (3 \, a^{3} b^{2} + 3 \, a^{2} b^{3} + a b^{4}\right )} \cos \left (f x + e\right )^{2}\right )} \log \left (a \cos \left (f x + e\right )^{2} + b\right ) + 4 \,{\left (a^{5} \cos \left (f x + e\right )^{4} + 2 \, a^{4} b \cos \left (f x + e\right )^{2} + a^{3} b^{2}\right )} \log \left (\frac{1}{2} \, \sin \left (f x + e\right )\right )}{4 \,{\left ({\left (a^{8} + 3 \, a^{7} b + 3 \, a^{6} b^{2} + a^{5} b^{3}\right )} f \cos \left (f x + e\right )^{4} + 2 \,{\left (a^{7} b + 3 \, a^{6} b^{2} + 3 \, a^{5} b^{3} + a^{4} b^{4}\right )} f \cos \left (f x + e\right )^{2} +{\left (a^{6} b^{2} + 3 \, a^{5} b^{3} + 3 \, a^{4} b^{4} + a^{3} b^{5}\right )} f\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.53223, size = 1100, normalized size = 8.46 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]